<template>
  <div class="bgDiv">
  <van-image class="errorImg" :src="require('../../assets/loadError.png')">
  <p class="errorTitle">暂无网络信息</p>
  </van-image>

  <van-button round type="default" color="#257A8D" class="reloadBtn" @click="clickReloadPage">刷新</van-button>
  </div>
</template>

<script>
// import httpRequest from '../../request/httpRequest'
import bridge from '../../request/bridge'
export default {
  name: '',
  components: {},
  data() {
    return {

    }
  },
  mounted() {
    //在模板渲染成html后调用，通常是初始化页面完成后，再对html的dom节点进行一些需要的操作 
    //页面加载完成后 点击前端页面 从原生获取值
      // this.pageGoBack =  bridge.pageGoBack; 
      
		},
  created(){
    // 发送title给前端
    window.sendToken =  this.sendToken;
    var info = {
				"title": "加载失败",
			}
    bridge.titleInfo(info);

    // 从前端 拿到token信息
    var token = bridge.getToken();
    console.log(token);
    if(token){
      this.$toast.success(token.token);
    }
    
    
    // var ddd =  {
		// 			'page': 'this.page',
    //       'aage': 'aaaaa'
		// 		};
    // var aaa = this.$http.getSign(ddd,'11233333');
  },
  methods:{
    clickReloadPage(){
      this.$router.push("InHospitalInfo");
      // bridge.reloadPage();
    },
    sendToken(tokenStr){
      console.log(tokenStr);
    }
  }
}
</script>

<style scoped>
.bgDiv{
  text-align:center;
}
.errorImg{
  margin-top: 270px;
  width: 477px;
	height: 367px;
}

.errorTitle{
  margin-top: -70px;
  width: 477px;
  float: left;
}
.reloadBtn{
  margin-top: 60px;
  width: 330px;
  height: 82px;
  color: aliceblue;
}

</style>
